<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="../include/taglib.jsp"%>

<%
    response.setHeader("Cache-Control", "no-store");
			response.setHeader("Pragrma", "no-cache");
			response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Telnet测试页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<%@ include file="../include/common.jsp"%>


<script type="text/javascript" src="log4javascript.js"></script>

<script type="text/javascript">

var log = log4javascript.getDefaultLogger();
	var lineCnt = 0;
	function fetchLog(){
		$.ajax({
			type:"POST",
			url:"/cgi-bin/log.cgi",
			contentType: "application/json;charset=utf-8",	
			dataType:"json",
			success:function(data){
				log.info(data);
				$("#log").append('<span>'+data.log+'</span>')
			},
			error:function(e){
				log.info(e);
			}
		})
	}

	$().ready(function() {
		
		fetchLog();
	});
	
	//setInterval('fetchLog()', 1000);
	
</script>

<style>
* {
	text-align: left;
	padding: 0;
	margin: 0 auto;
	font-size: 12px;
}

html {
	width: 100%;
	overflow-x: hidden;
}

body{
	margin:5px 10px 50px 10px;
}

</style>

</head>
<body>

    <form>
    	<label></label>
    	<input type="input"/>
    </form>
	<div id="log">
		<span><h2>开始:</h2></span>
	
	</div>
</body>
</html>